The function f is type as a function that takes a single input parameter of type View (another class from Android) and returns Unit, which is the Scala equivalent of void.
这个函数 f 的类型为带一个 View 类型(Android 中的另一个类)的输入参数的函数,并返回 Unit,它是 void 在 Scala 中的对等物。
Every method of the main interface has a matching entry in the asynchronous interface, but with a return type of void and an additional argument of class AsyncCallback.
主接口的每种方法在异步接口中都有相匹配的条目,但是附带了void返回类型和asynccallback类的附加参数。
Calling the class static void main (String args) directly won't work as expected, because it would invoke System.exit and so terminate the Workbench.
直接调用类static void main (String args)不会如预期一样工作,因为它将调用System . exit终止Workbench。
应用推荐